package com.tanhua.mongodbManager.service.impl;


import com.tanhua.mongodbManager.dao.UserDao;
import com.tanhua.mongodbManager.domain.db.User;
import com.tanhua.mongodbManager.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * 业务实现类
 */
@Service
public class UserServiceImpl implements UserService {

    @Autowired(required = false)
    private UserDao userDao;
    /**
     * 用户登录功能
     * @param adminName 用户名
     * @param password 密码
     * @return 登录成功返回user对象
     */
    @Override
    public User login(String adminName, String password) {
        return userDao.findUser(adminName, password);
    }
}
